Clone Removal in Java Programs as a Process of Stepwise Unification

نویسندگان

  • Daniel Speicher
  • Andri Bremm
چکیده

Cloned code is one of the most important obstacles against consistent software maintenance and evolution. Although today’s clone detection tools find a variety of clones, they do not offer any advice how to remove such clones. We explain the problems involved in finding a sequence of changes for clone removal and suggest to view this problem as a process of stepwise unification of the clone instances. Consequently the problem can be solved by backtracking over the possible unification steps.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

An evaluation of duplicate code detection using anti-unification

This paper describes an algorithm for finding software clones, which works at the level of abstract syntax trees and is thus conceptually independent of the source language of the analyzed programs. We use a notion of clones which captures replacement of subtrees in the program AST, and is formally based on the notion of anti-unification. This allows us to capture syntactic structural similarit...

متن کامل

Duplicate code detection using anti-unification

This paper describes a new algorithm for finding software clones. It is conceptually independent of the source language of the analyzed programs, working at the level of abstract syntax trees. The algorithm considers that two sequences of statements form a clone if one of them can be obtained from the other by replacing some subtrees. To our knowledge this notion was not previously employed in ...

متن کامل

An Empirical Study on Limits of Clone Unification Using Generics

Generics (templates) attempt to unify similar program structures to avoid explosion of redundant code. How well do generics serve this purpose in practice? We try to answer this question through empirical analysis from two case studies. First, we analyzed the Java Buffer library in which 68% of the code was redundant due to cloning. We were able to remove only 40% of the redundant code using th...

متن کامل

Adsorption Performance of Low-cost Java Plum Leaves and Guava Fruits as Natural Adsorbents for Removal of Free Fatty Acids from Coconut Oil

This study assesses the adsorption performance of Java plum leaves and guava fruits based adsorbents as natural products widely available in Aceh, Indonesia. These renewable adsorbents were employed to remove free fatty acids (FFAs) that cause the rancid odor in coconut oil. The adsorption tests were carried out at three different doses (50, 75, 100 g) and seven agitating periods (1, 2, 3, 4, 5...

متن کامل

JATO : Slicing Java Programs

Program slicing can be ffectively used to debug, test, analyze, understand and maintain object-oriented software. In this paper, a new slicing model is proposed to slice Java programs based on their inherent hierarchical feature. The main idea of hierarchical slicing is to slice programs in stepwise way, from package level, to class level, method level, and finally up to st atement level. Stepw...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1301.2447  شماره 

صفحات  -

تاریخ انتشار 2012